<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../tpl/head.jsp"%>
<link rel="stylesheet" href="statics/css/searchform.css">
<link rel="stylesheet" href="statics/css/BasicData/tpl/customerinfo.css">
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header layui-bg-cyan">
            <span id="cinfo">供应商信息</span>
        </div>
        <div class="layui-card-body">
            <div class="layui-row">
                <div class="layui-col-md12">
                    <form class="layui-form" action="" lay-filter="editor-form">
                        <div class="layui-tab layui-tab-card">
                            <ul class="layui-tab-title">
                                <li class="layui-this">基本信息</li>
                                <li class="">银行信息</li>
                                <li class="">日志</li>
                            </ul>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <%--                                    start--%>
                                    <dl class="layui-row sk_row">
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                供应商logo
                                            </div>
                                            <div class="layui-col-xs8"><div class="layui-upload-drag uploadimg" lay-data="">
                                                <img src="statics/images/layui-logo.jpg" id="userphotos" alt="上传成功后渲染" style="max-height: 80px" >
                                                <input name="logo" type="hidden">
                                                <div class="padding text-center" >
                                                    <input type="button" class="layui-btn uploadimg" lay-data="" style="margin-right: 10px!important;"  id="logoadd" value="添加">
                                                    <input type="button" class="layui-btn layui-btn-danger" id="userphotosdel"  value="清空">
                                                </div>
                                            </div></div>
                                        </dd>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                <text>供应商简称</text>
                                            </div>
                                            <div class="layui-col-xs8"> <input type="text" name="abbreviation" id="abbreviation" lay-verify="required" autocomplete="off" class="layui-input"></div>
                                        </dd>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                <text>采购员</text>
                                            </div>
                                            <div class="layui-col-xs8">
                                                <select name="salesman" id="salesman" lay-search>
                                                    <option value=""></option>
                                                </select>
                                            </div>
                                        </dd>


                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                <text>供应商编码</text>
                                            </div>
                                            <div class="layui-col-xs8"><input type="text" name="code" lay-verify="required" autocomplete="off" class="layui-input" readonly="true" id="code"></div>
                                        </dd>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                <text>供应商类型</text>
                                            </div>
                                            <div class="layui-col-xs8"><select name="type" id="type" lay-verify="required">
                                                <%--lay-filter="specificclassification" lay-verify="required"--%>
                                                <%-- <option value="0">潜在客户</option>
                                                 <option value="1">正式客户</option>
                                                 <option value="2">供应商</option>
                                                 <option value="3">货代</option>
                                                 <option value="4">船运</option>
                                                 <option value="5">其它</option>--%>
                                            </select></div>
                                        </dd>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                <text>供应商名称</text>
                                            </div>
                                            <div class="layui-col-xs8"><textarea lay-verify="required" name="name" id="name" placeholder="请输入内容" class="layui-textarea"></textarea></div>
                                        </dd>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                <text>供应商地址</text>
                                            </div>
                                            <div class="layui-col-xs8"><textarea lay-verify="required" name="address" placeholder="请输入内容" class="layui-textarea"></textarea></div>
                                        </dd>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                <text>国家/地区</text>
                                            </div>
                                            <div class="layui-col-xs8"> <select lay-verify="required" name="country" lay-search=""><option value=""></option> </select></div>
                                        </dd>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                <text>港口/省份</text>
                                            </div>
                                            <div class="layui-col-xs8"><select lay-verify="required" name="province" lay-search=""> </select></div>
                                        </dd>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                <text>城市</text>
                                            </div>
                                            <div class="layui-col-xs8"><select lay-verify="required" name="city" lay-search=""> </select></div>
                                        </dd>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                邮编
                                            </div>
                                            <div class="layui-col-xs8"><input type="text" name="postcode" autocomplete="off" class="layui-input"></div>
                                        </dd>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                电话
                                            </div>
                                            <div class="layui-col-xs8"><input type="tel" name="phone"  autocomplete="off" class="layui-input"></div>
                                        </dd>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                账期
                                            </div>
                                            <div class="layui-col-xs8"><input type="text" name="accountPeriod" disabled autocomplete="off" class="layui-input"></div>
                                        </dd>
<%--                                        <dd class="layui-col-md3">--%>
<%--                                            <div class="layui-col-xs4 text-right padding-right">--%>
<%--                                                开户银行--%>
<%--                                            </div>--%>
<%--                                            <div class="layui-col-xs8"> <input type="text" name="bank" autocomplete="off" class="layui-input"></div>--%>
<%--                                        </dd>--%>
<%--                                        <dd class="layui-col-md3">--%>
<%--                                            <div class="layui-col-xs4 text-right padding-right">--%>
<%--                                                银行账户--%>
<%--                                            </div>--%>
<%--                                            <div class="layui-col-xs8"><input type="text" name="bankaccount"   autocomplete="off" class="layui-input"></div>--%>
<%--                                        </dd>--%>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                等级
                                            </div>
                                            <div class="layui-col-xs8"> <select name="level" >
                                                <%--  lay-filter="defaultlevel" lay-verify="required"--%>
                                                <%-- <option value="0">重要</option>
                                                 <option value="1">非常重要</option>
                                                 <option value="2">一般</option>
                                                 <option value="3">潜在客户-有明确意向，成交可能性较大</option>
                                                 <option value="4">潜在客户-有意向，但有些犹豫，需要通过努力才能争取的客户</option>--%>
                                            </select></div>
                                        </dd>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                <text>主营产品</text>
                                            </div>
                                            <div class="layui-col-xs8"> <select name="mainBusiness" lay-search=""> </select></div>
                                        </dd>
<%--                                        <dd class="layui-col-md3">--%>
<%--                                            <div class="layui-col-xs4 text-right padding-right">--%>
<%--                                                <text>供应商来源</text>--%>
<%--                                            </div>--%>
<%--                                            <div class="layui-col-xs8"><select name="sourceOfCustomers" lay-search=""> </select></div>--%>
<%--                                        </dd>--%>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                付款类型
                                            </div>
                                            <div class="layui-col-xs8"><select disabled name="sourceOfCustomers" lay-search=""><option value=""></option> </select></div>
                                        </dd>

                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                <text>业务类型</text>
                                            </div>
                                            <div class="layui-col-xs8"> <select lay-verify="required" name="businessType" lay-search=""> </select></div>
                                        </dd>
<%--                                        <dd class="layui-col-md3">--%>
<%--                                            <div class="layui-col-xs4 text-right padding-right">--%>
<%--                                                主页--%>
<%--                                            </div>--%>
<%--                                            <div class="layui-col-xs8"><input type="text" name="homepage" autocomplete="off" class="layui-input"></div>--%>
<%--                                        </dd>--%>
<%--                                        <dd class="layui-col-md3">--%>
<%--                                            <div class="layui-col-xs4 text-right padding-right">--%>
<%--                                                SWIFT CODE--%>
<%--                                            </div>--%>
<%--                                            <div class="layui-col-xs8"><input type="text" name="swiftcode" autocomplete="off" class="layui-input"></div>--%>
<%--                                        </dd>--%>
<%--                                        <dd class="layui-col-md3">--%>
<%--                                            <div class="layui-col-xs4 text-right padding-right">--%>
<%--                                                跟进周期(天)--%>
<%--                                            </div>--%>
<%--                                            <div class="layui-col-xs8">  <input type="number" min="0" max="3650" name="followUpPeriod" autocomplete="off" class="layui-input"></div>--%>
<%--                                        </dd>--%>
<%--                                        <dd class="layui-col-md3">--%>
<%--                                            <div class="layui-col-xs4 text-right padding-right">--%>
<%--                                                快寄地址--%>
<%--                                            </div>--%>
<%--                                            <div class="layui-col-xs8"><input type="text" name="expressAddress" autocomplete="off" class="layui-input"></div>--%>
<%--                                        </dd>--%>
                                        <dd class="layui-col-md3" id="paymentAccountNoDiv" style="display: none">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                供应商代码
                                            </div>
                                            <div class="layui-col-xs8"> <input type="text" name="paymentAccountNo" autocomplete="off" class="layui-input"></div>
                                        </dd>
<%--                                        <dd class="layui-col-md3">--%>
<%--                                            <div class="layui-col-xs4 text-right padding-right">--%>
<%--                                                跟进阶段--%>
<%--                                            </div>--%>
<%--                                            <div class="layui-col-xs8"><select name="status" lay-search="">--%>
<%--                                                &lt;%&ndash; <option value="">跟进阶段</option>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;  <option value="1">洽谈中</option>&ndash;%&gt;--%>
<%--                                            </select></div>--%>
<%--                                        </dd>--%>
                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                备注
                                            </div>
                                            <div class="layui-col-xs8"> <textarea  name="remark" placeholder="请输入内容" class="layui-textarea"></textarea></div>
                                        </dd>

                                        <dd class="layui-col-md3">
                                            <div class="layui-col-xs4 text-right padding-right">
                                                附件
                                            </div>
                                            <div class="layui-col-xs8"><i class="layui-icon layui-icon-add-circle" style="font-size: 30px; color: #000000;line-height: 30px;" id="newfile"></i>
                                                <div class="layui-input-inline" id="addfilediv"></div></div>
                                        </dd>

                                    </dl>
                                    <%--    over--%>


                                </div>
                                <div  class="layui-tab-item">
                                    <table class="layui-table" id="bankselect" lay-filter="banktable"></table>
                                </div>
                                <div  class="layui-tab-item">
                                    <table class="layui-table" id="infoselect" lay-filter="infotable"></table>
                                </div>
                            </div>
                        </div>
                        <table class="layui-table" id="customerselect" lay-filter="customertable"></table>
                        <%--底部按钮--%>
                        <div class="padding">
                            <div class="layui-col-md2">
                                <a type="button" class="layui-btn" id="print">打印</a>
                            </div>
                            <div class="layui-col-md10 text-right">
                                <button type="button" class="layui-btn layui-btn-normal" lay-submit  lay-filter="customerinfo-form-save" id="save">保存</button>
                                <a type="button" class="layui-btn layui-btn-primary" id="shutdown">关闭</a>
                                <button type="button" class="layui-btn" lay-submit  lay-filter="customerinfo-form-submit" id="tjsp" display="block">提交审批</button>
                            </div>
                        </div>
                        <input type="hidden" name="spstatus" value="0">
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="selectCode" style="display: none;">
    <%--  <table class="layui-hide" id="erelevanceid" lay-filter="erelevanceid"></table>--%>
    <%--    <select name="qz">编码前缀</select>
       <select name="hz">编码后缀</select>--%>
    <div class="layui-inline">
        <label class="layui-form-label">编码前缀</label>
        <div class="layui-input-inline">
            <select name="qz" lay-search="">
                <%--   <option value="0">草稿</option>
                   <option value="1">审批中</option>--%>
            </select>
        </div>
    </div>
    <div class="layui-inline">
        <label class="layui-form-label">编码后缀</label>
        <div class="layui-input-inline">
            <select name="hz" lay-search="">
                <%--   <option value="0">草稿</option>
                   <option value="1">审批中</option>--%>
            </select>
        </div>
    </div>
    <div>
        <input type="button" class="layui-btn" value="申请" id="spbm" style="margin-top: 80px;margin-left: 130px">
        <input type="button" class="layui-btn" value="关闭" id="qx" style="margin-top: 80px;margin-left: 25px">
    </div>
</div>
<script type="text/html" id="customertoolbar">
    <a class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="new">添加</a>
    <a class="layui-btn layui-btn-sm layui-btn-danger"  lay-event="delet">删除</a>
</script>

<script type="text/html" id="customerup">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="customerup">修改</a>
   <%-- <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="customerde">删除</a>--%>
</script>

<script type="text/html" id="bankup">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="bankup">修改</a>
    <%-- <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="customerde">删除</a>--%>
</script>

<script type="text/html" id="banktoolbar">
    <a class="layui-btn layui-btn-sm" data-type="getCheckData" lay-event="newbank">添加</a>
    <a class="layui-btn layui-btn-sm layui-btn-danger"  lay-event="deletbank">删除</a>
</script>
<%@ include file="../../tpl/foot.jsp"%>
<script src="statics/js/BasicData/tpl/customer2info.js"></script>
<script src="statics/js/BasicData/codegeneration.js"></script>